/**
 * Created by Administrator on 2017/7/12.
 */
(function(w){

    var handler = new TagHandler();
    function ComponentEditor(){


    }

    ComponentEditor.prototype.show = function(){

    }

    ComponentEditor.prototype.buildDomByXML = function(){
        var self = this;
        $.get("xml/"+this.name+".xml",function(xmlNode){
            xmlNode = xmlNode.firstElementChild;
            w.__dataSrc = self;
            handler.handler(self.parentDom,xmlNode,[]);
        });
    }


    TuWenEditor.xml = "tuwen.xml";

    function TuWenEditor(options){
        this.name = "tuwen";
        this.obj = {id:123};
        var opt = this.options = options || {};
        this.parentDom = opt["dom"] || w.document.body;
        this.buildDomByXML("tuwen");
    }

    ComponentEditor.extend = function(obj){
        var c  = obj.prototype.constructor
        obj.prototype = ComponentEditor.prototype;
        obj.prototype.constructor = c;
    };
    ComponentEditor.extend(TuWenEditor);
    ComponentEditor["tuwen"] =TuWenEditor;
    w["ComponentEditor"] = ComponentEditor;

})(window)